import { httpDelete, httpGet, httpPost, httpPut } from '@/http'
import { services } from '@/config'

export const fetchList = query => httpGet(`${services.adminService}model-info/getPage`, query)

export const addObj = data => httpPost(`${services.adminService}model-info`, data)

export const getObj = id => httpGet(`${services.adminService}model-info/${id}`)

export const delObj = id => httpDelete(`${services.adminService}model-info/${id}`)

export const putObj = data => httpPut(`${services.adminService}model-info`, data)

export const saveOrUpdateModelInfo = data => httpPost(`${services.adminService}model-info/saveOrUpdateModelInfo`, data)

export const checkEntityExist = modelKey => httpPost(`${services.adminService}model-info/checkEntityExist/${modelKey}`)
